﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ListenMusic.Models.Reposistory.User;
using System.Web.Security;
using System.ServiceModel;
using System.Transactions;
namespace ListenMusic.Controllers.Public
{
    public class HomesocailController : Controller
    {
        //
        // GET: /Homesocail/
        private FriendResposistory _friend;
        public HomesocailController()
        {
            _friend = new FriendResposistory();
           
        }
        
        public ActionResult Index()
        {
            try
            {
                string username = Request.QueryString["username"];
              ViewBag.friend =  _friend.getFriendByUser(username);
              ViewBag.username = username;
            }
            catch (FaultException ex)
            {
                throw ex;
            }
            return View();
        }
      

    }
}
 